package com.app.mapper;

import com.app.model.ConsumptionOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 消费多少送多少订单记录 Mapper 接口
 * </p>
 *
 * @author yoominic
 * @since 2024-07-21
 */
public interface ConsumptionOrderMapper extends BaseMapper<ConsumptionOrder> {


    @Select("select id,name,classification " +
            "from tb_classification_config " +
            "where 1=1 order by id ")
    List<Map<String,Object>> getClassificationConfig();


    @Select("select  *\n" +
            "from tbc_areas a\n" +
            "left join tbc_cities c on a.city_id = c.city_id\n" +
            "where a.area_id = #{areaId} and a.city_id = #{cityId} ")
    Map<String,Object> getCityInfo(@Param("cityId")String cityId, @Param("areaId")String areaId);
}
